import type { RouteRecordRaw } from 'vue-router';

import Layout from '@/layouts/index.vue';

export const editorRoutes: RouteRecordRaw[] = [
  {
    path: '/editor',
    name: 'EditorRoot',
    component: Layout,
    redirect: '/editor/json',
    meta: {
      title: '编辑器',
      icon: 'RemarkOn',
      authCodes: [],
      visible: true,
    },
    children: [
      {
        path: '/editor/json',
        name: 'JsonIndex',
        component: () => import('@/views/editor/json/index.vue'),
        meta: {
          authCodes: [],
          title: 'JSON编辑器',
        },
      },
      {
        path: '/editor/rich-text',
        name: 'RichText',
        component: () => import('@/views/editor/rich-text/index.vue'),
        meta: {
          authCodes: [],
          title: '富文本编辑器',
        },
      },
      {
        path: '/editor/markdown',
        name: 'MarkdownIndex',
        component: () => import('@/views/editor/markdown/index.vue'),
        meta: {
          authCodes: [],
          title: 'Markdown编辑器',
        },
      }
    ],
  }
];
